package com.sky.mapper;

import com.sky.pojo.StudentTest;
import org.apache.ibatis.annotations.*;

//@Mapper
public interface StudentMapper {
    @Options(useGeneratedKeys = true,keyProperty = "id")
    @Insert("insert into studenttest (name,age) values (#{name},#{age})")
    int insert(StudentTest studentTest);

    @Select("select * from studenttest where id=#{id}")
    StudentTest selectById(Integer id);
    @Delete("delete  from studenttest where id=#{id}")
    int deleteById(Integer id);
    @Delete("delete from studenttest")
    int deleteByAll();
}
